package com.irs.irsforum.service;

import com.irs.irsforum.entity.Favorite;
import com.baomidou.mybatisplus.service.IService;

import java.sql.SQLException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yihuili
 * @since 2020-01-18
 */
public interface IFavoriteService extends IService<Favorite> {

    /**
     * 收藏
     * @param postId 帖子Id
     * @param userId 用户Id
     * @return
     */
    Integer setFavorite(Long postId, Long userId) throws SQLException;

    /**
     * 取消收藏
     * @param postId 帖子Id
     * @param userId 用户Id
     * @return
     */
    Integer cancelFavorite(Long postId, Long userId);
}
